package Panel;

import java.util.ArrayList;
import java.util.Iterator;


public class ShapeArrayList {
	ArrayList<Shape> shapes=new ArrayList<Shape>();
	public void add(Shape a){
		shapes.add(a);
	}
	public void translate(double x,double y){
		Iterator<Shape> it=shapes.iterator();
		while(it.hasNext()){
			((Shape)it.next()).translate(x, y);
		}
		
	}
	public void scale(double x,double y){
		Iterator<Shape> it=shapes.iterator();
		while(it.hasNext()){
			((Shape)it.next()).scale(x, y);
		}
	}
	public void rolate(double n,double x,double y){
		Iterator<Shape> it=shapes.iterator();
		while(it.hasNext()){
			((Shape)it.next()).rotate(n, x, y);
		}
	}
	public void showShape(){
		Iterator<Shape> it=shapes.iterator();
		while(it.hasNext()){
			((Shape)it.next()).showshape();
		}
	}

}
